using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class WoodGateInteract : MonoBehaviour,IInteractable
{
    public GameObject logCabin;
    public GameObject outsider;
    public Camera cam;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    
    public void EnterColl()
    {
        GetComponentInChildren<Image>().color = new Color(GetComponentInChildren<Image>().color.r,
            GetComponentInChildren<Image>().color.b,GetComponentInChildren<Image>().color.g, 1);
    }

    public void LeaveColl()
    {

        GetComponentInChildren<Image>().color = new Color(GetComponentInChildren<Image>().color.r,
            GetComponentInChildren<Image>().color.b,GetComponentInChildren<Image>().color.g, 0);
    }
    public void Interact()
    {
        logCabin.SetActive(true);
        cam.GetComponent<Mask>().enabled = true;
        outsider.SetActive(false);
    }
    
}
